﻿function Save(DBNPaymentId) {
    PaymentDate = document.getElementById("divPaymentDate").value;
    PaymentMode = document.getElementById("divPaymentType").value;
    PaymentRef = document.getElementById("divPaymentRef").value;
    //Rate = document.getElementById("divRate").value;
    Amount = document.getElementById("divAmount").value;
    //Currency = document.getElementById("divCurrency").value;
    Description = document.getElementById("divDescription").value;

    RetValue = Portal.Vision.UpdatePayment.ServerSideUpdatePayment(DBNPaymentId, PaymentDate, PaymentMode, PaymentRef, Amount, Description).value;
    if (RetValue != null) {
        if (RetValue.indexOf("ERROR") != -1) {
            alert(RetValue);
            return;
        }
    }

    Url = RetValue;
    alert("Cập nhật thành công!");
    window.open(Url, "_self");
}